export function readingsOutsideRange(station, min, max) {
	return station.readings
		.filter(r => r.temp < min || r.temp > max);
}

export function maxTempInsideRange(station, min, max) {
	return station.readings
		.filter(r => r.temp >= min && r.temp <= max)
		.map(r => r.temp)
		.sort((a, b) => b - a)[0];
}

export function minTempInsideRange(station, min, max) {
	return station.readings
		.filter(r => r.temp >= min && r.temp <= max)
		.map(r => r.temp)
		.sort((a, b) => a - b)[0];
}
